a) Field of the Invention
This invention relates to an automatic focusing apparatus to be used for a television camera or another optical apparatus.
b) Prior Art
A known technique for automatically detecting signals representing an object in-focus (hereinafter referred to as in-focus signals) utilizes the frequency transmission characteristics of the camera lens of a camera and high frequency components of video signals. With this technique, a specific portion of the scanning lines of the video signal obtained by the camera lens for a particular scene is selected and the high frequency component of that portion is removed by means of a high pass filter (hereinafter referred to as HPF) so that the peak value of the high frequency component may be held by a peak-hold circuit to detect the amount of the high frequency component. Since the output voltage of the peak-hold circuit reaches a maximum when the lens system of the camera is focused on the subject to be taken by the camera, the focusing position of the lens system can be determined by detecting the maximum output voltage of the peak-hold circuit.
However, problems arise using such a technique. Firstly, there is no way of knowing in which direction the lens needs to be moved for better focusing when the output voltage of the peak-hold circuit becomes apparent only for a part of the focused area. Secondly, no exact focusing can be achieved when the output voltage reflects a saturated condition or the peak is rather dull and, if such is the case, only a blurred image can be produced by the camera. In an attempt to avoid these problems, the applicant of the present patent application has devised an automatic focusing apparatus comprising a plurality of HPFs having different cut-off frequencies and means for detecting in-focus signals by selectively weighting the outputs of the HPFS. (See Japanese Patent Laid-Open No. 62-60369.) An improved automatic focusing apparatus of the above described type proposed by the inventor of the present invention further comprises a microcomputer for arbitrarily determining an area in the view finder of a camera for detecting in-focus signals. (See Japanese Patent Laid Open No. 63-253773.)
Any known automatic focusing apparatus requires that a specific area is predetermined for detection of in-focus signals in the view finder of a camera corresponding to the subject to be shot by the camera so that in-focus signals may be detected from the video signals of the camera only for the area. The automatic focusing apparatus as disclosed in Japanese Patent Laid-Open No. 63353773 as cited above further comprises for this purpose a counter for counting the number of reference pulses from an oscillator during the active period of a horizontal synchronizing signal from zero, a pair of latch circuits t1 and t2 for latching respective timing data t1 and t2 from the microcomputer, a pair of comparators for comparing the latched timing data t1 and t2 with the reading of the counter and transmitting output signals with the respective timing data t1 and t2 and a gate signal generating circuit for generating the outputs of the comparators as gate signals and predetermining the t1 and t2 as detection areas. These t1 and t2 data are used to horizontally limit the detection areas and consequently the effective areas of scanning lines in order to determine an area for detection of in-focus signals.
c) Problems to be Solved by the Invention
Since any of the known apparatuses as described above requires a sample-hold circuit for each scanning line from which in-focus signals are extracted, the overall size of the aggregate of such apparatuses can become very large if a large number of scanning lines are involved. Besides, the analog adder used for selectively weighting and adding outputs of a plurality of HPFs having different characteristics is accompanied by the problem of difficulty of modifying weighting factors when the number of HPFs is large and that of saturation of the adder when the number of related scanning lines is large.
The reference pulses generated by the oscillator are not correlated with the horizontal synchronizing signals involved and, therefore, the span of scanning can be accidentally displaced by a single pulse. Difference of frequency of horizontal synchronizing signals among cameras can also give rise to displacement of the span of scanning.
Moreover, since peak values of output signals of HPFs are used as in-focus signals, the peak of an in-focus signal, which is normally pointed and moved depending on the lens position, can become flattened and/or saturated to blur the focused point. Because a spot showing the strongest contrast an a scene is judged to be the focused point, a foreign object such as a piece of dust located by chance near the subject to be focused can produce a strong contrast and mistakenly be focused in place of the subject. When the subject to be shot by the camera is a flat and low contrast item such as a semiconductor chip pattern, the in-focus signal obtained from the subject can be flat and the focusing operation can become rather inaccurate. With a subject having a curved surface and showing a strong reflection of light outside the focused area, as in the case of a piece of metal, the surface area showing a strong contrast can be easily focused.
Transient noise can be produced at the rising edge of the video signal passing through the gate when the gate of a camera is opened by a gate signal. Transient noise can also be produced in a similar manner at the falling edge of the video signal passing through the gate when the gate is closed to block passage of video signals and these noises can adversely affect the operation of in-focus signals. FIG. 10 of the accompanying drawings shows how an embodiment of the present invention operates and also the above described problems of the prior art. According to a prior art camera of the type in question, a video output signal produced only for a limited area specified by the gate from a corresponding video input signal and, therefore, transient noise Tn appears at the rising and falling edges of a video signal for the area specified by the gate due to the transient phenomenon. While each video output signal is used to detect the position in-focus in a scene after passing through HPFs, a peak-hold circuit and other components, any transient noise Tn contained in the video output signal can affect the output of the HPFs in such a manner that the output of the peak-hold circuit may become different from the signal representing the contrast of the original video output signal and consequently the accuracy of focusing may deteriorate.
Where an automatic focusing apparatus of an optical system comprising an objective lens and a tube body to shoot a work is involved, the positional relationship of the in-focus condition detecting section of the apparatus and the drive motor is controlled by utilizing the magnification of the objective lens (or the overall optical system) and the minimum pitch of movement of the translation table, meaning that the section requires replacement depending on the application of the optical system and therefore such an apparatus has little flexibility in terms of applicability. Besides, the translation table can have backlash to an unignorable extent so as to bring the work to be shot by the optical system out of focus. Finally, the positional relationship between the work and the automatic focusing apparatus can be different from that of the work and the observer in terms of optical focusing.
d) Objects to be Achieved by the Invention
It is therefore an object of the present invention to provide a compact automatic focusing apparatus having a simplified overall configuration, free from saturation of its adder and capable of easily modifying the weighting factor of each scanning line whenever necessary by feeding the CPU with data generated each time an in-focus signal is obtained from the scanning lines to be examined for focusing.
Another object of the present invention is to provide an automatic focusing apparatus capable of getting rid of any unduly high influence of strongly contrasted portions in the field shot by the optical system and obtaining highly accurate in-focus signals even when the overall contract of the field shot by the optical system is low.
Still another object of the present invention is to provide an automatic focusing apparatus free from transient noises contained in video output signals and having an improved focusing accuracy.
Still another object of the present invention is to provide an automatic focusing apparatus capable of avoiding any displacement of the span of scanning by making the phase of the reference signal agree with that of the horizontal synchronizing signal.
A further object of the present invention is to provide an automatic focusing apparatus that has flexibility in terms of applicability and can eliminate any adverse effects of backlash and any positional discrepancy between the observer and the apparatus in terms of optical focusing.